package com.aizuda.boot.modules.business.counterparty.entity;

import cn.hutool.log.Log;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * @Author sangyirong
 * @ClassName ChangeRecord
 * @Version 1.0
 * @Date 2025/7/12 12:09
 */
@Data
@Schema(description = "变更记录")
public class ChangeRecord {

    @Schema(description = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "关联的 counterpartId")
    private Long counterpartyId;

    @Schema(description = "关联的 legalId")
    private Long legalId;

    @Schema(description = "版本号")
    private Integer version;

    @Schema(description = "字段名")
    private String field;

    @Schema(description = "旧值")
    private String oldValue;

    @Schema(description = "新值")
    private String newValue;

    @Schema(description = "创建人id")
    private Long createId;

    @Schema(description = "创建人")
    private String createBy;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
